package com.ruoyi.finance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.finance.mapper.TSalaryWayBillRelMapper;
import com.ruoyi.finance.domain.TSalaryWayBillRel;
import com.ruoyi.finance.service.ITSalaryWayBillRelService;

/**
 * 工资关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-14
 */
@Service
public class TSalaryWayBillRelServiceImpl implements ITSalaryWayBillRelService 
{
    @Autowired
    private TSalaryWayBillRelMapper tSalaryWayBillRelMapper;

    /**
     * 查询工资关联
     * 
     * @param salaryBillId 工资关联主键
     * @return 工资关联
     */
    @Override
    public TSalaryWayBillRel selectTSalaryWayBillRelBySalaryBillId(Long salaryBillId)
    {
        return tSalaryWayBillRelMapper.selectTSalaryWayBillRelBySalaryBillId(salaryBillId);
    }

    /**
     * 查询工资关联列表
     * 
     * @param tSalaryWayBillRel 工资关联
     * @return 工资关联
     */
    @Override
    public List<TSalaryWayBillRel> selectTSalaryWayBillRelList(TSalaryWayBillRel tSalaryWayBillRel)
    {
        return tSalaryWayBillRelMapper.selectTSalaryWayBillRelList(tSalaryWayBillRel);
    }

    /**
     * 新增工资关联
     * 
     * @param tSalaryWayBillRel 工资关联
     * @return 结果
     */
    @Override
    public int insertTSalaryWayBillRel(TSalaryWayBillRel tSalaryWayBillRel)
    {
        return tSalaryWayBillRelMapper.insertTSalaryWayBillRel(tSalaryWayBillRel);
    }

    /**
     * 修改工资关联
     * 
     * @param tSalaryWayBillRel 工资关联
     * @return 结果
     */
    @Override
    public int updateTSalaryWayBillRel(TSalaryWayBillRel tSalaryWayBillRel)
    {
        return tSalaryWayBillRelMapper.updateTSalaryWayBillRel(tSalaryWayBillRel);
    }

    /**
     * 批量删除工资关联
     * 
     * @param salaryBillIds 需要删除的工资关联主键
     * @return 结果
     */
    @Override
    public int deleteTSalaryWayBillRelBySalaryBillIds(Long[] salaryBillIds)
    {
        return tSalaryWayBillRelMapper.deleteTSalaryWayBillRelBySalaryBillIds(salaryBillIds);
    }

    /**
     * 删除工资关联信息
     * 
     * @param salaryBillId 工资关联主键
     * @return 结果
     */
    @Override
    public int deleteTSalaryWayBillRelBySalaryBillId(Long salaryBillId)
    {
        return tSalaryWayBillRelMapper.deleteTSalaryWayBillRelBySalaryBillId(salaryBillId);
    }

    /**
     * 新增工资关联
     *
     * @param salaryBillId 账单ID
     * @param wayBillIds 运单ID列表
     * @return 结果
     */
    @Override
    public int insertTSalaryWayBillRelExt(Long salaryBillId, List<Long> wayBillIds)
    {
        return tSalaryWayBillRelMapper.insertTSalaryWayBillRelExt(salaryBillId, wayBillIds);
    }

}
